import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/asset_general_detail_entity.dart';

AssetGeneralDetailEntity $AssetGeneralDetailEntityFromJson(Map<String, dynamic> json) {
	final AssetGeneralDetailEntity assetGeneralDetailEntity = AssetGeneralDetailEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		assetGeneralDetailEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		assetGeneralDetailEntity.msg = msg;
	}
	final AssetGeneralDetailData? data = jsonConvert.convert<AssetGeneralDetailData>(json['data']);
	if (data != null) {
		assetGeneralDetailEntity.data = data;
	}
	return assetGeneralDetailEntity;
}

Map<String, dynamic> $AssetGeneralDetailEntityToJson(AssetGeneralDetailEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] = entity.data.toJson();
	return data;
}

AssetGeneralDetailData $AssetGeneralDetailDataFromJson(Map<String, dynamic> json) {
	final AssetGeneralDetailData assetGeneralDetailData = AssetGeneralDetailData();
	final List<AssetGeneralDetailDataData>? data = jsonConvert.convertListNotNull<AssetGeneralDetailDataData>(json['data']);
	if (data != null) {
		assetGeneralDetailData.data = data;
	}
	return assetGeneralDetailData;
}

Map<String, dynamic> $AssetGeneralDetailDataToJson(AssetGeneralDetailData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	return data;
}

AssetGeneralDetailDataData $AssetGeneralDetailDataDataFromJson(Map<String, dynamic> json) {
	final AssetGeneralDetailDataData assetGeneralDetailDataData = AssetGeneralDetailDataData();
	final String? id = jsonConvert.convert<String>(json['id']);
	if (id != null) {
		assetGeneralDetailDataData.id = id;
	}
	final String? userId = jsonConvert.convert<String>(json['user_id']);
	if (userId != null) {
		assetGeneralDetailDataData.userId = userId;
	}
	final String? money = jsonConvert.convert<String>(json['money']);
	if (money != null) {
		assetGeneralDetailDataData.money = money;
	}
	final String? before = jsonConvert.convert<String>(json['before']);
	if (before != null) {
		assetGeneralDetailDataData.before = before;
	}
	final String? after = jsonConvert.convert<String>(json['after']);
	if (after != null) {
		assetGeneralDetailDataData.after = after;
	}
	final String? type = jsonConvert.convert<String>(json['type']);
	if (type != null) {
		assetGeneralDetailDataData.type = type;
	}
	final String? memo = jsonConvert.convert<String>(json['memo']);
	if (memo != null) {
		assetGeneralDetailDataData.memo = memo;
	}
	final String? itemId = jsonConvert.convert<String>(json['item_id']);
	if (itemId != null) {
		assetGeneralDetailDataData.itemId = itemId;
	}
	final String? ext = jsonConvert.convert<String>(json['ext']);
	if (ext != null) {
		assetGeneralDetailDataData.ext = ext;
	}
	final String? createdAt = jsonConvert.convert<String>(json['created_at']);
	if (createdAt != null) {
		assetGeneralDetailDataData.createdAt = createdAt;
	}
	final String? updatedAt = jsonConvert.convert<String>(json['updated_at']);
	if (updatedAt != null) {
		assetGeneralDetailDataData.updatedAt = updatedAt;
	}
	return assetGeneralDetailDataData;
}

Map<String, dynamic> $AssetGeneralDetailDataDataToJson(AssetGeneralDetailDataData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['user_id'] = entity.userId;
	data['money'] = entity.money;
	data['before'] = entity.before;
	data['after'] = entity.after;
	data['type'] = entity.type;
	data['memo'] = entity.memo;
	data['item_id'] = entity.itemId;
	data['ext'] = entity.ext;
	data['created_at'] = entity.createdAt;
	data['updated_at'] = entity.updatedAt;
	return data;
}